<?php
function query_user($userid,$password){
	$query="SELECT * FROM user WHERE userid=".$userid." AND password='".md5($password)."'";
	$result=mysql_query($query);
	return $result;
}
function update_user_status($userid,$lastlogin='',$status){
	$query="UPDATE user SET STATUS=$status,LASTLOGIN='$lastlogin' WHERE USERID=$userid";
	mysql_query($query);
}


?>